package com.springboot.sofa.service.impl;

import com.alipay.sofa.runtime.api.annotation.SofaService;
import com.alipay.sofa.runtime.api.annotation.SofaServiceBinding;
import com.springboot.sofa.service.UserService;
import org.springframework.stereotype.Component;

import java.util.HashMap;

/**
 * @Author: TongRui乀
 * @Date: 2021/7/4 15:40
 * @description：
 */
@SofaService(interfaceType = UserService.class, bindings = { @SofaServiceBinding(bindingType = "bolt") })
@Component
public class UserServiceImpl implements UserService {
    @Override
    public String hello() {
        return "hi everybody";
    }

    @Override
    public HashMap<String, Object> getUserInfo(Long id) {
        var user = new HashMap<String,Object>();

        user.put("id", id);
        user.put("name", "jack");
        user.put("address", "北京");
        user.put("email", "jack@qq.com");

        return user;
    }
}
